﻿using com.fmtx.IDal;
using fmtx.Framework.DALFactory;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;

namespace website.Areas.Website.Controllers
{
    public class CityController : Controller
    {
        //
        // GET: /Website/City/
        IArticle _article = DataAccess<IArticle>.GetObject();

        public ActionResult Index(int id,string keyword,int p=1)
        {
            int index=Math.Max(p-1,0);
            int count = 0;
            ViewBag.articles = _article.Query(index, 12, keyword, id, 0, 0, 0,ref count);
            ViewBag._PageBean = new PageBean(p, 12, count, this);
            return View();
        }

    }
}
